package com.example;

public class SmsTask implements Runnable {

    private String url;

    private String phone;

    private String context;

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getContext() {
        return context;
    }

    public void setContext(String context) {
        this.context = context;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public SmsTask(String url, String phone, String context) {
        this.url = url;
        this.phone = phone;
        this.context = context;
    }

    @Override
    public void run() {
        String smsMessageString = SmsMessageUtils.toDtoV2(phone, context);
        HttpUtils.post(url, smsMessageString);
    }
}
